package com.example.light.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

@ApiModel(value = "登录日志文件")
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName("loginLog")
public class loginLog {
    @ApiModelProperty("登录日志文件id")
    @TableId(type = IdType.AUTO)
    private Integer loginId;

    @ApiModelProperty("登录账号")
    private String loginAccount;

    @ApiModelProperty("登录用户名")
    private String loginName;

    @ApiModelProperty("登录角色")
    private String loginRole;


    @ApiModelProperty("登录ip")
    private String loginIp;

    @ApiModelProperty("ip类型")
    private String ipType;

    @ApiModelProperty("登录时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime loginTime;
}
